post /vms/{vmId}/operations/preparetodetach

Prepare To Detach (prepareToDetach)

After the VM is "Fully Cached" and you want to start the detach process, the first task required is "Prepare to detach" the VM from Velostrata. This task takes the VM disks from the Velostrata cache and object store and creates the native data drives in the cloud. A Velostrata exporter is deployed automatically in the cloud to perform this task. The exporter runs through all data disks and converts them to native cloud disks, after this first iteration is completed, the exporter continues to write the changes committed since its previous execution. This task runs in cycles. After sufficient progress has been achieved (3 cycles), the VM is marked as "Ready to Detach". The VM can then be detached from Velostrata in minutes. The Velostrata exporter continues to synchronize the VM disks from cache into the native AWS EBS/Azure drives, until detached or until manually stopped (stop prepare to detach). Once the VM is in the "Ready to Detach" state you will effectively have to "cut over" and will need to schedule a downtime slot for the actual detach action. The VM must be in the Fully Cached state prior to running the prepare to detach operation. If the VM is not in the Fully Cached state, first run the procedure to migrate the VM storage to the cloud. Note - If you want to stop (revert back) after the preparing to detach process has finished, you can stop or rollback the detach process.

Path parameters

vmId (required)

Path Parameter — Virtual machine ID

Consumes

This API call consumes the following media types via the Content-Type request header:

  • application/json

Request body

storageSpec TargetStorageSpec (required)

Body Parameter — Storage Specifications

targetStorageSpec (optional)

TargetStorageSpec

_type

String AWS or Azure

Enum:

AwsTargetStorageSpec

AzureTargetStorageSpec

GcpTargetStorageSpec

AWSTargetStorageSpec

storageType

String AWS target storage

isEbsEncryption (optional)

Boolean Use EBS Encryption for native volumes. Only applicable to AWS.

ebsEncryptionKeyAlias (optional)

StringEncryption key alias or ARN to be used for encryption. If isEbsEncryption is set to true and this isn't specified the default key will be used.

AzureTargetStorageSpec

storageAccount

String Azure storage account

Return type

TaskId

value (optional)

String Entity ID

_type

String Task ID

Enum:

TaskId

 

 

AWS Example data

Content-Type: application/json

{

"storageType": "gp2",

"isEbsEncryption": false,

"_type": "AwsTargetStorageSpec"

}

 

Azure Example data

Content-Type: application/json

{

"storageAccount": "/subscriptions/a0123bc4-d567-89e1-0111-f21g31h4i151/resourceGroups/rg1519342736-Max/providers/Microsoft.Storage/storageAccounts/sa1513398296ikn",

"_type": "AzureTargetStorageSpec"

}

 

GCP Example data

Content-Type: application/json

{

"storageType": "standard",

"_type": "GcpTargetStorageSpec"

}

 

 

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

  • application/json

Responses

201

Created TaskId

Default

Error ErrorInfo

errorCode (optional)

String

url(optional)

String

message (optional)

String